# Maintainer: Caleb Connolly <caleb@connolly.tech>
pkgname=buffyboard
pkgver=0.2.0
pkgrel=0
_lv_drivers_commit="33983bcb0a9bfd0a4cf44dba67617b9f537e76f3"
_lvgl_commit="a2b555e096f7d401b5d8e877a6b5e81ff81c747a"
_squeek2lvgl_commit="e3ce01bc38020b21bc61844fa1fed1a4f41097c5"
pkgdesc="Touch-enabled framebuffer keyboard (not only) for vampire slayers"
url="https://gitlab.com/cherrypicker/buffyboard"
arch="all"
license="GPL-3.0-only"
source="https://gitlab.com/cherrypicker/buffyboard/-/archive/$pkgver/buffyboard-$pkgver.tar.gz
	https://github.com/lvgl/lv_drivers/archive/$_lv_drivers_commit.tar.gz
	https://github.com/lvgl/lvgl/archive/$_lvgl_commit.tar.gz
	https://gitlab.com/cherrypicker/squeek2lvgl/-/archive/$_squeek2lvgl_commit/buffyboard-$_squeek2lvgl_commit.tar.gz"
makedepends="meson libinput-dev libxkbcommon-dev linux-headers eudev-dev"

prepare() {
	default_prepare

	mkdir -p "$builddir"/lvgl "$builddir"/lv_drivers "$builddir"/squeek2lvgl
	mv "$srcdir"/lvgl-$_lvgl_commit/* "$builddir"/lvgl
	mv "$srcdir"/lv_drivers-$_lv_drivers_commit/* "$builddir"/lv_drivers
	mv "$srcdir"/squeek2lvgl-$_squeek2lvgl_commit/* "$builddir"/squeek2lvgl
}

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
6a504ed775ebcc03276b2c10e299e894cdc3ea3c7e40d263e449982dd6ac6a7f37fe2094c84e6d0b92c3f965aefc38e606de66bd74d8d375bb2168acb0c0284e  buffyboard-0.2.0.tar.gz
788ab2ac810580222e85c580a6e7d94783b6e4a29688274d6eb85ec7e9cbe8c146452baf9b2c8ecde135b9e68539218affd4d3bde40667ed1e2da2fa9b9feea4  33983bcb0a9bfd0a4cf44dba67617b9f537e76f3.tar.gz
6db243760407176d57bc1aafc9145f8f089e6be4b74afff966ca6fbf29605ccd30afbd113412c7259040894eb7506a90a40c07c0e0be1c7bfbaab01c5ea2727c  a2b555e096f7d401b5d8e877a6b5e81ff81c747a.tar.gz
57fb6bb0445e27c5529f96499f744f64038c549f741ff17a2fc83902e7bdbcf1358c4a3eb37848f89e98d1e6011bb46581ab081bf0b0e01350de2f75e58e2f33  buffyboard-e3ce01bc38020b21bc61844fa1fed1a4f41097c5.tar.gz
"
